package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.common.info.DeviceGroupInfo;
import com.task.core.dto.request.DeviceGroupRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/11/5 16:29
 */
@Mapper
public interface DeviceGroupMapper {

  List<DeviceGroupInfo> getDeviceGroupByPage(DeviceGroupRequestDTO request);

  DeviceGroupInfo getDeviceGroupByCode(String code);

  List<KeyAndValue> getDeviceGroupForOption(DeviceGroupRequestDTO request);

  void addDeviceGroup(DeviceGroupRequestDTO request);

  Integer modifyDeviceGroup(DeviceGroupRequestDTO request);

  Integer deleteDeviceGroup(@Param("code") String refererSourceCode, @Param("userId") Long userId);

  List<DeviceGroupInfo> getDeviceGroupByMissionCode(@Param("missionCode") String missionCode);

  void deleteMissionDeviceGroupRelation(String deviceGroupCode);

    DeviceGroupInfo getDeviceGroupDetailByCode(DeviceGroupRequestDTO deviceGroupRequestDTO);
}
